#ifndef HEAD_H
#define HEAD_H
#include<iostream>
using namespace std;

class adjList;
class vertex{
public:
    int i;
    char c;
    adjList *adj=NULL;
};


class edge{
public:
    int i;
    int weight;
    int start,end;
    edge * next=NULL;
    edge(){}
//    edge(int st,int en,int w):start(st),end(en),weight(w){}
};

//element included in the vertex for joining edges and vertexe
class adjList{
public:
    edge e;
    int nextVertex;
    adjList *next=NULL;
};

//the entire graph
class graph{
private:
    vertex *v;
    edge *ehead=new edge;
    int edgeNum=0;
    int *mark;
public:
    graph();
    ~graph();
    void setEdge(int st,int en,int w);
    void showBfs();
    void Bfs(int i);
    int FirstEdge(int i);
    int NextEdge(int i, int eg);
};


#endif // HEAD_H
